<?php

/*

	Author:	Cedric McMillan Junior

	Date:	March 15th 2012
	
	Aim:	replaces text in a different language, using caching and logging

*/





chdir('../');
# global variables and defines
require_once("common/globals.inc.php");

# common set of helper functions
require_once("common/common.inc.php");

# cache class
require_once("classes/cache.class.php");
$gCacheObject		=	new Classes_Cache();

# text class
require_once("classes/text.class.php");
$gText				=	new Classes_Text($gCacheObject);



# start new comment file
resetCommentFile();



# language 
$language			=		$_POST['language'];

# create the language file
#$fn					=		LANGUAGE_ARRAY_PATH		.	$language	.	".php";
# this will get the language array from the cache, or put it into the cache also
#$gLanguageString	=	$gCacheObject->getOrSet(CACHE_TIME_TINY,"language","$language", "includeLanguageArray","$fn");






# get the text string (from the cache if need be)
$myInfo		=	$gText->getTextStringLanguage("LBL_DESCRIPTION",$language);

# get the text (from the cache if need be)
$log		=	nl2br(loadFile(LOG_FILE));



# return two variables
echo json_encode(array("log" => $log, "myInfo" => "$myInfo")); 








?>